package cn.xuexiyuan.springstudy.core.demo01;

import cn.xuexiyuan.springstudy.core.demo01.config.SequenceGeneratorConfiguration;
import cn.xuexiyuan.springstudy.core.demo01.entity.SequenceGenerator;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class Main {
    public static void main(String[] args) {
        ApplicationContext context = new AnnotationConfigApplicationContext(SequenceGeneratorConfiguration.class);
        SequenceGenerator seq = context.getBean(SequenceGenerator.class);
        System.out.println(seq.getSequence());
        System.out.println(seq.getSequence());
        System.out.println(seq.getSequence());
    }
}
